﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartPhoneClient
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 单击“开桌”按钮对应事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void menuItem1_Click(object sender, EventArgs e)
        {
            string tableID = textBox1.Text;
            Infomation.InitOrder(); //初始化菜单
            Form3 f3 = new Form3(tableID);
            f3.Show();
        }

        /// <summary>
        /// 单击“菜单查询”按钮对应事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void menuItem2_Click(object sender, EventArgs e)
        {
            string tableID = textBox1.Text;
            Infomation.tableID = tableID;
            string command = "CheckOrder|" + tableID;
            Byte[] outbytes = System.Text.Encoding.Unicode.GetBytes(command.ToCharArray());
            Infomation.MySocket.Send(outbytes, outbytes.Length, 0);
        }

    }
}